class MyClass:
    my_name = "python"

    def __init__(self, my_school):
        self.my_school = my_school

    def a_fun(self):
        return "welcom " + self.my_name


if __name__ == '__main__':
    my = MyClass("Tencent")
    print("属性值：", my.my_name)
    print("方法输出：", my.a_fun())
    print(my.__class__)
    print("类的属性值：", MyClass.my_name)
    print(type(my), dir(my))

    print(my.my_school)
    print(MyClass("tencent").my_school)
    # print(MyClass.my_school)  # AttributeError: type object 'MyClass' has no attribute 'my_school'
